import React, { Component } from 'react'
import {
  Link,
  Route,
  Redirect
} from 'react-router-dom'

export default class Movie extends Component {
  render() {
    return (
      <div>
        <h1> 电影页面</h1>
        <ul>
          <li>
            <Link to="/movie/hotshowing">热映</Link>
          </li>
          <li>
            <Link to="/movie/classica">经典电影</Link>
          </li>
        </ul>

        <Route path="/movie/hotshowing">
          <h2>热映页面</h2>
        </Route>

        <Route path="/movie/classica">
          <h2>经典电影页面</h2>
        </Route>

        <Redirect exact to="/movie/hotshowing" from="/movie"></Redirect>

      </div>
    )
  }
}
